package plp.functional2.primitive;

import java.util.List;

import plp.expressions2.expression.Expressao;
import plp.expressions2.expression.Id;

/**
 * It is what two processes exchange, sending and receiving informations. 
 * @author Airton
 */
public class Message {
	
	private List<Expressao> pattern;
	private Id idProcessReceiver;
	private Id idProcessSender;
	
	public Message(Id idProcessSender,Id idProcessReceiver,	List<Expressao> pattern) {
		super();
		this.pattern = pattern;
		this.idProcessReceiver = idProcessReceiver;
		this.idProcessSender = idProcessSender;
	}

	public List<Expressao> getPattern() {
		return pattern;
	}

	public void setPattern(List<Expressao> pattern) {
		this.pattern = pattern;
	}

	public Id getIdProcessReceiver() {
		return idProcessReceiver;
	}

	public void setIdProcessReceiver(Id idProcessReceiver) {
		this.idProcessReceiver = idProcessReceiver;
	}

	public Id getIdProcessSender() {
		return idProcessSender;
	}

	public void setIdProcessSender(Id idProcessSender) {
		this.idProcessSender = idProcessSender;
	}	
	
	@Override
	public String toString() {
		return " Preceiver: " + this.getIdProcessReceiver()+ 
			   ", Pattern: " + this.getPattern();
	}
}
